<template>
	<view>
		<image class="more" src="/static/icon/more.png" mode="widthFix" @click="showReport"></image>
		<u-popup :show="isReport" mode="bottom" :safeAreaInsetBottom="true" @close="close">
			<view class="box">
				<view class="title">
					投诉
				</view>
				<view style="width: 100%;" @click="goComplaint">
					<image class="icon" src="/static/image/tousu.png" mode="widthFix"></image>
					<view class="text">
						投诉
					</view>
				</view>
				<view class="close" @click="isReport = false">
					取消
				</view>
			</view>
		</u-popup>
	</view>
</template>

<script>
	export default {
		props: {
			id: {
				type: String,
				default: () => {
					return ''
				}
			},


		},
		data() {
			return {
				isReport: false
			}
		},
		methods: {
			showReport() {
				this.isReport = true
			},
			close() {
				console.log("close");
				this.isReport = false
			},
			goComplaint() {
				this.isReport = false
				this.$nextTick(() => {
					uni.navigateTo({
						url: '/pages/home/complaint?id=' + this.id
					})
				})
			},
		}
	}
</script>

<style lang="scss" scoped>
	.more {
		width: 48rpx;
		height: 48rpx;
	}

	.box {
		padding-top: 20rpx;
		box-sizing: border-box;
		width: 750rpx;
		height: 504rpx;
		background: #FFFFFF;
		border-radius: 20rpx 20rpx 20rpx 20rpx;
		display: flex;
		justify-content: center;
		flex-wrap: wrap;

		.title {
			font-family: Noto Sans SC, Noto Sans SC;
			font-weight: normal;
			font-size: 32rpx;
			color: #000000;
			width: 100%;
			text-align: center;
		}

		.icon {
			width: 112rpx;
			margin-left: 60rpx;
		}

		.text {
			font-family: Noto Sans SC, Noto Sans SC;
			font-weight: normal;
			font-size: 24rpx;
			color: #000000;
			margin-left: 90rpx;
		}

		.close {
			width: 664rpx;
			height: 82rpx;
			line-height: 82rpx;
			background: #EDEDED;
			border-radius: 41rpx 41rpx 41rpx 41rpx;
			font-family: Noto Sans SC, Noto Sans SC;
			font-weight: normal;
			font-size: 36rpx;
			color: #363636;
			text-align: center;
		}
	}
</style>